<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>片段引用表达式</title>
</head>
<body>
<div>

    <p style="color: red"><b>请查看页面源代码</b></p>

    ------------------------------------------------

    <p style="color: blue">th:insert：将【整个代码块】【插入】到使用了 th:insert 属性的 HTML 标签中</p>
    <div th:insert="common/common::fragmentName"></div>
    <div th:insert="common/common::#fragmentId"></div>

    ------------------------------------------------

    <p style="color: blue">th:replace：将【整个代码块】【替换】使用了 th:replace 属性的 HTML 标签中</p>
    <div th:replace="common/common::fragmentName"></div>
    <div th:replace="common/common::#fragmentId"></div>

    ------------------------------------------------

    <p style="color: blue">th:include：将【代码块包含的内容】【插入】使用了 th:include 属性的 HTML 标签中</p>
    <div th:include="common/common::fragmentName"></div>
    <div th:include="common/common::#fragmentId"></div>

    ------------------------------------------------

    <p style="color: red">引用公共代码并传递参数</p>
    <div th:include="common/common::authorInfo(name='xzy',phone='1629981234')"></div>

</div>
</body>
</html>